<!DOCTYPE html>












  


<html class="theme-next gemini use-motion" lang="zh-CN">
<head><meta name="generator" content="Hexo 3.9.0">
  <!-- hexo-inject:begin --><!-- hexo-inject:end --><meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">












  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=7.2.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=7.2.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=7.2.0">


  <link rel="mask-icon" href="/images/logo.svg?v=7.2.0" color="#222">






<link rel="stylesheet" href="/css/main.css?v=7.2.0">






<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css?v=4.7.0">








<script id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '7.2.0',
    sidebar: {"position":"left","display":"post","offset":12,"onmobile":false},
    back2top: {"enable":true,"sidebar":false,"scrollpercent":false},
    copycode: {"enable":false,"show_result":false,"style":null},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},
    search: {
      root: '/',
      path: ''
    },
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    translation: {
      copy_button: '复制',
      copy_success: '复制成功',
      copy_failure: '复制失败'
    }
  };
</script>

  <meta name="description" content="I&apos;m a bluetooth Host and Controller developer">
<meta name="keywords" content="bluetooth, reading, thinking">
<meta property="og:type" content="website">
<meta property="og:title" content="Wen Wu&#39;s notes">
<meta property="og:url" content="http://yoursite.com/page/3/index.html">
<meta property="og:site_name" content="Wen Wu&#39;s notes">
<meta property="og:description" content="I&apos;m a bluetooth Host and Controller developer">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Wen Wu&#39;s notes">
<meta name="twitter:description" content="I&apos;m a bluetooth Host and Controller developer">





  
  
  <link rel="canonical" href="http://yoursite.com/page/3/">



<script id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  
  <title>Wen Wu's notes</title>
  












  <noscript>
  <style>
  .use-motion .motion-element,
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-title { opacity: initial; }

  .use-motion .logo,
  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript><!-- hexo-inject:begin --><!-- hexo-inject:end -->

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <!-- hexo-inject:begin --><!-- hexo-inject:end --><div class="container sidebar-position-left 
  page-home">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Wen Wu's notes</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <p class="site-subtitle">technical record</p>
      
    
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">

    
    
      
    

    

    <a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-about">

    
    
      
    

    

    <a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i> <br>关于</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">

    
    
      
    

    

    <a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">

    
    
      
    

    

    <a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i> <br>分类</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">

    
    
      
    

    

    <a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-schedule">

    
    
      
    

    

    <a href="/schedule/" rel="section"><i class="menu-item-icon fa fa-fw fa-calendar"></i> <br>日程表</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-sitemap">

    
    
      
    

    

    <a href="/sitemap.xml" rel="section"><i class="menu-item-icon fa fa-fw fa-sitemap"></i> <br>站点地图</a>

  </li>

      
      
    </ul>
  

  

  
</nav>



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
            

          
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">
    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/05/28/ble-spec-introduction/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/05/28/ble-spec-introduction/" class="post-title-link" itemprop="url">关于BLE的好文</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-05-28 22:04:12" itemprop="dateCreated datePublished" datetime="2020-05-28T22:04:12+08:00">2020-05-28</time>
            </span>
          

          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/蓝牙/" itemprop="url" rel="index"><span itemprop="name">蓝牙</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/05/28/ble-spec-introduction/" class="post-meta-item leancloud_visitors" data-flag-title="关于BLE的好文">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/05/28/ble-spec-introduction/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/05/28/ble-spec-introduction/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>一系列介绍<a href="http://bbs.wireless-tech.cn/d/73-ble">BLE 规范</a>的好文，对于了解BLE的整体概念非常有帮助。当然要想深入理解，还是要读原汁原味的Spec，让你苦思冥想，在谜团中寻找自己需要的东西，才更有收获。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/BLE/BLE-Arc.png" alt></p>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/05/04/talk-about-running/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/05/04/talk-about-running/" class="post-title-link" itemprop="url">我跑，故我在</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-05-04 13:37:25" itemprop="dateCreated datePublished" datetime="2020-05-04T13:37:25+08:00">2020-05-04</time>
            </span>
          

          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/阅读/" itemprop="url" rel="index"><span itemprop="name">阅读</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/05/04/talk-about-running/" class="post-meta-item leancloud_visitors" data-flag-title="我跑，故我在">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/05/04/talk-about-running/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/05/04/talk-about-running/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>村上春树是一个多产的作家，我只看过一本《当我谈跑步时，我谈些什么》。<br>村上也是个跑步专家，每年夏天参加铁人三项，冬天参加马拉松。<br>谈到为啥选择跑步时，他认为就是自己喜欢，自己没有兄弟姐妹，对于对抗性的以及与人合作的运动项目不喜欢，所以他选择了跑步，跑步是与自己对话的过程，小说的很多写作方法也是跑步的时候想出来的。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/%E8%B7%91%E6%AD%A5/CunShangChunshu.png" alt></p>
<p>他写的跑一百公里超级马拉松时候的感觉，特别的细腻。</p>
<blockquote>
<ul>
<li>就这样，我坚持又坚持，总算跑了下来。当我跑到七十五公里处，感觉似乎又什么东西攸地出窍了。除了“出窍”一词，我想不出还有什么好的表达。简直就像穿透了石壁一般，身体一下子钻了过去，来到了另外一面。</li>
<li>如此长时间地不停奔跑，不可能感觉不到肉体上的苦楚。但到了这个时候，疲劳已不是什么重大问题。这也许意味着疲劳作为一种常态，被身体自然而然地接纳了。一度沸沸扬扬的肌肉革命议会似乎也灰心丧气，不再逐一倾诉不满。已经无人敲桌子，无人扔杯子了。它们将这疲劳作为历史的必然，作为革命的成果，默默无言地接受下来。我便自动地、只管有规律地前后甩动手臂，将双腿一步一步向前递出去。什么都不思，什么都不想。待回过神来，连肉体的苦楚都似乎销声匿迹，或像因故无法处理的难看家具，被扔到了毫不起眼的角落。</li>
<li>我陷入了类似自动驾驶的状态。这么继续跑下去，只怕过了一百公里我还能跑。听上去颇有些怪异：跑到最后，不仅是肉体的苦痛，甚至连自己到底是谁、此刻在干什么之类，都已经从脑海中消失殆尽。这理当是十分可笑的心情，可是我连这份可笑都无法感受到了。这这里，跑步几乎达到了形而上学的领域。仿佛先有了行为，然后附带性地才有了我的存在。我跑，故我在。</li>
<li>在我的周遭，许多人只是默默向着终点奔去。身处其中，我拥抱着异常静谧的幸福感。吸气，再吐气，听不出呼吸中攸丝毫紊乱。空气非常平静地进入身体，再走出体外。我那寡言的心脏按照一定的速度重复着舒张与收缩，我的肺好像好似勤劳的风箱，规规矩矩将新鲜氧气摄入体内。我能够目睹它们工作的身影，听见它们发出的声响。一切都顺畅无误地运站着。沿途的人们对这我们大声呼唤“加油啊，马上就到终点站了“声音像透明的风，穿透我的身体逝去。我感觉人们的声音就这般穿透而过，直达身体的另一面。</li>
<li>我是我，又不是我。这是一种异常沉稳而寂静的心情</li>
</ul>
</blockquote>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/04/12/smart-sleep/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/04/12/smart-sleep/" class="post-title-link" itemprop="url">如何聪明的睡觉</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-04-12 10:09:19" itemprop="dateCreated datePublished" datetime="2020-04-12T10:09:19+08:00">2020-04-12</time>
            </span>
          

          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2020-04-25 18:09:19" itemprop="dateModified" datetime="2020-04-25T18:09:19+08:00">2020-04-25</time>
              </span>
            
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/阅读/" itemprop="url" rel="index"><span itemprop="name">阅读</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/04/12/smart-sleep/" class="post-meta-item leancloud_visitors" data-flag-title="如何聪明的睡觉">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/04/12/smart-sleep/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/04/12/smart-sleep/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>如何提高睡觉的效率：</p>
<ul>
<li>卧室要黑，做到伸手不见五指。</li>
<li>睡觉前1个半小时不要接触电子产品<blockquote>
<p>蓝光会影响褪黑激素的分泌</p>
</blockquote>
</li>
<li>10点到11点是身体分泌褪黑激素的时间，这个时候必须尽快睡觉。</li>
<li>晚上大概有4～6个睡眠周期，每个周期是1个半小时，最好不要打断这些周期。</li>
<li>平时多晒太阳</li>
<li>用脚踩土地，吸收负电子。</li>
</ul>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/04/06/letter-for-fresh-engineer/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/04/06/letter-for-fresh-engineer/" class="post-title-link" itemprop="url">给新任软件工程师的建议</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-04-06 21:54:32" itemprop="dateCreated datePublished" datetime="2020-04-06T21:54:32+08:00">2020-04-06</time>
            </span>
          

          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/阅读/" itemprop="url" rel="index"><span itemprop="name">阅读</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/04/06/letter-for-fresh-engineer/" class="post-meta-item leancloud_visitors" data-flag-title="给新任软件工程师的建议">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/04/06/letter-for-fresh-engineer/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/04/06/letter-for-fresh-engineer/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p><a href="https://www.florio.dev/20200328-letter-to-myself/">给自己，一个新手软件工程师的建议</a></p>
<ul>
<li>Run a marathon, not a sprint.<blockquote>
<p>工作是一场马拉松，不是短跑。</p>
</blockquote>
</li>
<li>Be humble, not stupid.<blockquote>
<p>保持谦逊，但别笨（并不是所有其他人都比你好）。</p>
</blockquote>
</li>
<li>Compare with yourself, not others.<blockquote>
<p>跟自己比，不是别人。</p>
</blockquote>
</li>
<li>Respect people, not titles.<blockquote>
<p>尊重人，而不是尊重头衔。</p>
</blockquote>
</li>
<li>Choose the challenge, not comfort.<blockquote>
<p>迎接挑战，而不是固守舒坦。</p>
</blockquote>
</li>
<li>Jump on the whiteboard, not on the keyboard.<blockquote>
<p>工作从白板开始，不是键盘。</p>
</blockquote>
</li>
<li>Deliver value, not code.<blockquote>
<p>产出价值，不是代码。</p>
</blockquote>
</li>
</ul>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/09/nimble-esp32/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/03/09/nimble-esp32/" class="post-title-link" itemprop="url">nimble on ESP32</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-03-09 20:49:41" itemprop="dateCreated datePublished" datetime="2020-03-09T20:49:41+08:00">2020-03-09</time>
            </span>
          

          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Nimble/" itemprop="url" rel="index"><span itemprop="name">Nimble</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/03/09/nimble-esp32/" class="post-meta-item leancloud_visitors" data-flag-title="nimble on ESP32">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/03/09/nimble-esp32/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/03/09/nimble-esp32/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>   从好友Yufeng那里得知Nimble有在ESP32上落地，刚好手头有一片ESP-WRCOM-32，手痒痒就download了一份ESP32的<a href="https://github.com/espressif/esp-idf">IDF</a> 玩下。<br><a href="https://docs.espressif.com/projects/esp-idf/en/stable/get-started/#get-started-connect">Getting Start</a> 写的真心不错，简单明了，照着操作步骤一步一步跑就能跑起来Nimble的example project。不过ESP32只用了Nimble的Host，没有用Controller的部分，毕竟ESP32是Combo chip，Nimble Controller Scheduler没有考虑过Wifi的部分。</p>
<blockquote>
<ul>
<li>ESP32文档很很赞，花了大力气做宣传，内容挺丰富，也很正规，YouTube也有很多教学视频。</li>
<li>还挺开放，放了不少源码出来，包括ble mesh等。</li>
<li>不知道为啥没有自己的Host，之前用bluedroid，footprint没啥优势。</li>
</ul>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">I (0) cpu_start: App cpu up.</span><br><span class="line">I (386) heap_init: Initializing. RAM available for dynamic allocation:</span><br><span class="line">I (393) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM</span><br><span class="line">I (399) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM</span><br><span class="line">I (405) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM</span><br><span class="line">I (411) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM</span><br><span class="line">I (417) heap_init: At 3FFC3B68 len 0001C498 (113 KiB): DRAM</span><br><span class="line">I (424) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM</span><br><span class="line">I (430) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM</span><br><span class="line">I (436) heap_init: At 40093CE0 len 0000C320 (48 KiB): IRAM</span><br><span class="line">I (443) cpu_start: Pro cpu start user code</span><br><span class="line">I (461) spi_flash: detected chip: gd</span><br><span class="line">I (461) spi_flash: flash io: dio</span><br><span class="line">W (462) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.</span><br><span class="line">I (472) cpu_start: Starting scheduler on PRO CPU.</span><br><span class="line">I (0) cpu_start: Starting scheduler on APP CPU.</span><br><span class="line">I (557) BTDM_INIT: BT controller compile version [fd2a63b]</span><br><span class="line">I (557) system_api: Base MAC address is not set</span><br><span class="line">I (557) system_api: read default base MAC address from EFUSE</span><br><span class="line">I (657) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0</span><br><span class="line">I (887) NimBLE_BLE_PRPH: BLE Host Task Started</span><br><span class="line">I (897) uart: queue free spaces: 8</span><br><span class="line">Device Address: 80:7d:3a:d7:f1:56</span><br><span class="line">GAP procedure initiated: advertise; disc_mode=2 adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=0 adv_itvl_max=0</span><br></pre></td></tr></table></figure>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/02/29/how-to-pick-career/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/02/29/how-to-pick-career/" class="post-title-link" itemprop="url">如何寻找一份适合你的职业</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-02-29 23:46:38" itemprop="dateCreated datePublished" datetime="2020-02-29T23:46:38+08:00">2020-02-29</time>
            </span>
          

          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2020-04-05 18:06:38" itemprop="dateModified" datetime="2020-04-05T18:06:38+08:00">2020-04-05</time>
              </span>
            
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/阅读/" itemprop="url" rel="index"><span itemprop="name">阅读</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/02/29/how-to-pick-career/" class="post-meta-item leancloud_visitors" data-flag-title="如何寻找一份适合你的职业">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/02/29/how-to-pick-career/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/02/29/how-to-pick-career/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>一篇有深度的好文<a href="https://waitbutwhy.com/2018/04/picking-career.html">How to Pick a Career</a>，大约需要6小时读完。<br>作者Tim Urban以写长<a href="https://waitbutwhy.com">博客</a>著称，讲话很幽默，这里有一个他在TED的关于拖延症的<a href="https://www.ted.com/talks/tim_urban_inside_the_mind_of_a_master_procrastinator?language=zh-cn">讲座</a>，可以一睹他的真容，挺接地气的一个小伙。</p>
<h2 id="先甩个锅"><a href="#先甩个锅" class="headerlink" title="先甩个锅"></a>先甩个锅</h2><p>先声明的是这篇文章只算是一个路标，我们是路人，到底要不要按照路标去走，纯粹是个人的事情。</p>
<blockquote>
<p> 这个是混沌大学李善友老师用来给自己甩锅的一句话，哈哈。<br> 李老师总是想给别人一些指导，压力巨大，怕给人指错了，后来他就用这个路标和路人的关系给自己甩锅。</p>
</blockquote>
<h2 id="做自己人生的CEO，为自己负责"><a href="#做自己人生的CEO，为自己负责" class="headerlink" title="做自己人生的CEO，为自己负责"></a>做自己人生的CEO，为自己负责</h2><p>我们生下来后就象是弱弱的小蝌蚪被放在既定好的河流上漂流（见下图），这个河流我们是没办法选的(就是说投胎投到哪儿没办法选)，这个时候有父母师长管理我们的成长，做我们的CEO；但是到大学一毕业，我们两眼抹黑，啥也不会(skill-less and knowledge-less and a lot of other things-less)，突然间要做我们自己人生的CEO，真的很难。这篇文章介绍了一个寻找真我（your real self），寻找适合自己工作的一个方法论（framework）。</p>
<blockquote>
<ul>
<li>我们中的有些人会发现自己是一只可爱的小狗，它最想做的事儿就是取悦它的主人，不能忍受主人对它的失望，很悲惨的是这个主人往往不是它自己，是那些心理上比你强大的人，如果你不小心，你几十年的的职业生涯只是去取悦他们使他们骄傲。这个他们很可能是你的父母。</li>
<li>作者回顾了一下自己的经历，觉得最让他烦恼的是：其他人掌控你的思想，压制了真实的你的声音。<br>  “未来我的目标不是不犯错误，而是只犯我自己犯的错误”。</li>
</ul>
</blockquote>
<p><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/river-2.png?x-oss-process=image/resize,p_50" alt><br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/helpless-shore-2.jpg?x-oss-process=image/resize,p_30" alt></p>
<h2 id="人的一生中真正做有意义事情的时间真的很少，所以请认真选择自己的工作"><a href="#人的一生中真正做有意义事情的时间真的很少，所以请认真选择自己的工作" class="headerlink" title="人的一生中真正做有意义事情的时间真的很少，所以请认真选择自己的工作"></a>人的一生中真正做有意义事情的时间真的很少，所以请认真选择自己的工作</h2><h4 id="工作大致上可以比作两类：大厨（Chef）和厨子（cook）"><a href="#工作大致上可以比作两类：大厨（Chef）和厨子（cook）" class="headerlink" title="工作大致上可以比作两类：大厨（Chef）和厨子（cook）"></a>工作大致上可以比作两类：大厨（Chef）和厨子（cook）</h4><ul>
<li>大厨的思维：用各种食材、经历各种尝试，弄出一盘菜。<blockquote>
<p>大厨要付出非常多的时间和精力，就像是带着眼罩，在一个诡异的森林里寻找出路，要经历非常多的失败、尝试。<br>做大厨大多数情况下非常耗时间，所以机会成本也高。</p>
</blockquote>
</li>
<li>厨子的思维：照着大厨给的配方直接炒菜就好了，比较轻松，不用动太多脑子。适合不把工作当回事儿的人。</li>
</ul>
<p>人的一生总共750000小时（=750000/24/365=85.6年，可能是美国人的平均寿命），那么这么多万个小时都是怎么度过的呢？</p>
<blockquote>
<ul>
<li>童年+青春期有 175000小时（=175000/24/365=20年）</li>
<li>吃喝玩乐+睡觉 325000小时（37年）</li>
<li>还剩下250000个小时（28.5年）是可以去做有意义的事情，其中20%～60%用在工作上，约50000到150000个小时，就是6年到17年的时间。<blockquote>
<p>而你的工作时间又会极大的影响你的生活，你的影响力，你对自己的身份认同，所以一定要慎重选择自己的工作，别到老了才后悔（象苏大强那样儿）。</p>
<blockquote>
<p>苏大强有个账本，记录了三个娃每个人从小到大的花销，在妻子去世后，他就靠这个账本跟孩子们要钱过活，过的相当滋润。</p>
</blockquote>
</blockquote>
</li>
</ul>
</blockquote>
<p><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/Time-Pie-Chart.png?x-oss-process=image/resize,p_80" alt></p>
<h2 id="那么如何选择一份职业呢？"><a href="#那么如何选择一份职业呢？" class="headerlink" title="那么如何选择一份职业呢？"></a>那么如何选择一份职业呢？</h2><p>先看这个文尼图，用Want Box来记录你能想到的你想做的所有职业，用Reality Box来记录那些根据你潜力你应该能从事的职业，那么这两个Box的交集就是你要的职业，你要努力的方向。中间交集的地方每个点代表一份职业，这些个点还带个小箭头，如果你从事的很多份职业的方向是大致一致的，那么你就不得了，越积累越厉害。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/want-reality-venn.png?x-oss-process=image/resize,p_30" alt></p>
<h3 id="先来看下如何填-Want-Box"><a href="#先来看下如何填-Want-Box" class="headerlink" title="先来看下如何填 Want Box"></a>先来看下如何填 Want Box</h3><p>这个章鱼图，从5个纬度来把职业做了大致分类，你可以根据你自己的爱好，把你自己想做的职业分布到这几个维度里。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/Octopus-3-segmented-1.png?x-oss-process=image/resize,p_50" alt></p>
<ul>
<li>Personal: 自我实现型<blockquote>
<p>职业是为了自我实现，彰显个性，体现自我。那些很成功，但是不开心的人，往往会认为自己的成功是错误的。<br>很多人迫于生计或是其他原因从事的是其他几个类型的职业，过了很多年才发现不是自己所要的。</p>
</blockquote>
</li>
<li>Social: 社会型<blockquote>
<p>这类职业是比较有社会地位那种：医生，律师，公务员。<br>这种职业是我们最基本的，动物性一面的体现，可以追溯到我们祖先的部落生活，在部落里要想生存，就得合群，相互照应，最好能有权力，掌握资源，给自己多分几口肉吃。</p>
</blockquote>
</li>
<li>Moral: 道德型<blockquote>
<p>比如你一想到很多非洲儿童食不果腹，衣不蔽体，你就吃不下饭，你觉得自己是个好人，应该做点啥。<br>这类职业比如很多NGO组织，临终关怀组织等等。</p>
</blockquote>
</li>
<li>Practical: 实在型<blockquote>
<p>工作就是为了买房买车，为了赡养家人，无他。</p>
</blockquote>
</li>
<li>Lifestyle: 安逸型<blockquote>
<p>就是希望压力能少点，能有足够的自由时间可以让自己去吃喝玩乐。<br>但这又很矛盾，你当下轻松了，可能长远的看并不轻松，只是把问题留到了将来。</p>
</blockquote>
</li>
</ul>
<p>可能你想做的工作不是在一个种类里，那也正常，证明你有多面性，而且可能不同年龄段想做的职业也不一样。</p>
<h4 id="下一步就是分析下到底哪些是真实的你想做的事情"><a href="#下一步就是分析下到底哪些是真实的你想做的事情" class="headerlink" title="下一步就是分析下到底哪些是真实的你想做的事情"></a>下一步就是分析下到底哪些是真实的你想做的事情</h4><p>你想做某个职业的想法，可能是其他人安插到你大脑里的（可能是父母，或是你看的某本书里的一个英雄）。这个一定要分析得透彻，非常重要，甚至你自己都挖不出来真实的你在想什么，可能被打压的过分，隐藏的太深了。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/mom-mask-4.png?x-oss-process=image/resize,p_50" alt><br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/friends-mask-6.png?x-oss-process=image/resize,p_50" alt><br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/denial-prison-2.png?x-oss-process=image/resize,p_50" alt></p>
<h4 id="确定好你要做的职业后，就按照优先级排下序。"><a href="#确定好你要做的职业后，就按照优先级排下序。" class="headerlink" title="确定好你要做的职业后，就按照优先级排下序。"></a>确定好你要做的职业后，就按照优先级排下序。</h4><p>作者用一个书架来比喻，在书架上面放了一个碗，这里面装的是最高优先级的，书架里三个格子，从上到下优先级逐级降低，旁边是个垃圾桶。</p>
<ul>
<li>NN Bowl：这块是你认为最重要的，你愿意投入足够的时间、牺牲掉所有其它欲望去做的职业。这个碗很小，你最好只放一个东西在里面。<blockquote>
<p>世界上很多牛人在某一方面做到最强，都是在内心中的NN bowl非常强烈，当然代价也很大，要牺牲的可能是朋友家人关系，甚至是自己的健康。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/yearning-hierarchy-2.png?x-oss-process=image/resize,p_80" alt></p>
</blockquote>
</li>
</ul>
<h3 id="再来看下Reality-Box"><a href="#再来看下Reality-Box" class="headerlink" title="再来看下Reality Box"></a>再来看下Reality Box</h3><p>你要根据你了解的世界和你的潜力做一个评估，评估根据你的潜力去实现在某个职业中的成功所需要的难度。</p>
<ul>
<li>潜力就是如果你有足够的时间，你在该职业内能做到足够好达到职业或行业内的成功吗？<br>下图中A代表你目前所处的位置，星表示成功点，他们之间的距离就是实现成功的难度。</li>
<li>要注意的是“星”并不单纯指的是技术修炼到最好，指的是在整个行业内玩的好。<br>— 比如你想做个好莱坞影星，并不是说你的演技跟摩根弗里曼一样好就行的，你需要有机会去有权力的人那里去表现获得赏识，你需要谦逊和有足够的耐力一直坚持等等，才能有可能成为一线影星。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/A-star-1-1.png" alt><br>如果你是个学计算机的学生，你的梦想是成为google公司的一个软件工程师，那难度可能不大。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/A-star-2-1.png" alt><br>如果你想弄个新google出来，那难度可能就非常大了<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/A-star-4-2.png" alt></li>
</ul>
<p>那么如何计算你达到“星”的机会呢，请看下面这个公式<br>Progress = Pace x Persistence.<br>机会 = 步长 * 坚持</p>
<h4 id="步长"><a href="#步长" class="headerlink" title="步长"></a>步长</h4><ul>
<li>你做为大厨思维有多少决定了你进步有多快<blockquote>
<p>工作就像个复杂的游戏，基本上每个人开头都很难，而大厨可以根据下图所示迅速进展。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/Chef-Strategy-Loop-1-768x687.png?x-oss-process=image/resize,p_50" alt></p>
</blockquote>
</li>
<li>你的工作精神<blockquote>
<p>一周工作60小时，一年工作50周的人要比一周工作20小时，一年工作40周的人进展快。<br>选择工作生活平衡的人，要比一根筋儿的工作狂（workaholic）进展慢。<br>经常中断工作做白日梦或玩手机的人要比能集中精力工作的人进展慢。</p>
</blockquote>
</li>
<li>你的天赋<blockquote>
<p>在职业相关的领域有天赋的，进展更快。<br>比如你的职业是社会型的，那如果自己在人际关系处理上有天赋，对建立深入的社会关系有心得，那就做起来得心应手。</p>
</blockquote>
</li>
</ul>
<h4 id="坚持"><a href="#坚持" class="headerlink" title="坚持"></a>坚持</h4><p>工作时马拉松，不是短跑。不只是几年的投入，可能要几十年。</p>
<p>那么接下来就开始填写你的Reality Box吧，总结起来是5个方面：</p>
<p>1) 尽力去了解整个职业的全貌，比如之前的例子，相当好莱坞影星，不仅仅是要演技好，还有其他方面要补，比如要认识哪些大佬，自己平时是不是要穿的拉风点。<br>2) 职业平台有多大？规则有哪些？<br>3) 评估你目前所处的位置，你掌握的技能，跟该职业是否有关系？<br>4) 你要做到在该职业内的成功是什么样儿？<br>5）评估你的步长。根据你现在的能力，你预计能跑多快。</p>
<blockquote>
<p>你想去google当工程师，那你是不是先花4年读个计算机学位？还是你觉得自学要比去学校更快？<br>6）你愿意投入多少时间在这份职业上，是三年五年，还是10年</p>
</blockquote>
<p>经过一番深入分析，你的optional pool里应该有了新的小圆点。</p>
<blockquote>
<p>有些自我感觉良好的人可能经过这么一轮分析，觉得自己跌落神坛了，但是没关系，这轮分析至少可以让你对自己的职业选择做个聚焦。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/venn-1.png?x-oss-process=image/resize,p_30" alt></p>
</blockquote>
<p>那么接下来，你该在你的optional pool里选一个职业了，这个确实很难决定。<br>你可能会认为职业是需要40年的坚持的，直到退休，如下图。不过这个只是个传统的想法。</p>
<ul>
<li>根据调查，现在的年轻人从事一份职业的平均时间是3年，年长一点的人的这个时间平均是10.4年。</li>
<li>如果你一定要这样看的话，你可能会有身份危机，不知道自己现在以及几十年后变成什么样子。</li>
<li>而且你可能不敢去换工作，即使是你的内心真的想这么做。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/tunnels-2.png?x-oss-process=image/resize,p_50" alt></li>
</ul>
<p>你应该把你的职业想象成一些列连起来的点</p>
<ul>
<li>这些个点就象是在做科学实验，一步步逼近你要的东西。</li>
</ul>
<p><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/opportunity-cost-2.png?x-oss-process=image/resize,p_50" alt></p>
<p>关于坚持，不得不注意下，如果在一个错误的职业上坚持意义也不大，如果过早的退出一份职业也不是好事儿。</p>
<ul>
<li>下图中最左端穿水泥鞋子的人，不敢换工作，在一个错误的职业得过且过。</li>
<li>最右端鞋子长羽毛的人换职业又太快。</li>
</ul>
<p>据心理学家研究，人之将死的时候一般都会对自己的惰性有点遗憾“我希望我能早点退出”，“不要作自己不喜欢的工作”<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/inertia-spectrum.png?x-oss-process=image/resize,p_80" alt></p>
<p>最后你应该是如下图的一个状态，随着你认知的不断升级，你可能会不断发现自己喜欢的职业，并不断优化自己，直到达到自己心目中的成功。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/HowToSelectCareer/venn-with-big-loop-small.png?x-oss-process=image/resize,p_30" alt></p>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/02/19/people-splash/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/02/19/people-splash/" class="post-title-link" itemprop="url">人类群星闪耀时</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-02-19 23:29:38" itemprop="dateCreated datePublished" datetime="2020-02-19T23:29:38+08:00">2020-02-19</time>
            </span>
          

          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2020-02-26 22:57:38" itemprop="dateModified" datetime="2020-02-26T22:57:38+08:00">2020-02-26</time>
              </span>
            
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/阅读/" itemprop="url" rel="index"><span itemprop="name">阅读</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/02/19/people-splash/" class="post-meta-item leancloud_visitors" data-flag-title="人类群星闪耀时">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/02/19/people-splash/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/02/19/people-splash/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>1815年，拿破仑与威灵顿的军队在滑铁卢恶战几小时，已经到了关键时刻，被拿破仑命令追杀普鲁士部队的格鲁希元帅墨守成规，否决了副手热拉尔力求尽快支援拿破仑的请求，特鲁西决定继续被动等拿破仑的通知，最后导致拿破仑惨败。他不知道这一秒的决定彻底改变了拿破仑的命运，改变了人类历史。</p>
<blockquote>
<ul>
<li><p>那关键的一秒就这样进行了可怕的报复。在尘世的生活中，这样的一瞬间时很少降临的。当它无意之中降临到一个人身上时，他却不知掉如何利用它。在命运降临的伟大瞬间，市民的一切美德—小心、顺从、勤勉、谨慎、都无济于事，它始终只对天才人物提出要求，并且将他造就成不朽的形象。命运鄙视地把畏首畏尾的人拒之门外。命运—这世上的另一位神灵，只愿意用热烈的双臂把勇敢者高高举起，送上英雄们的天堂。</p>
</li>
<li><p>有时候—这是世界历史上最令人惊奇的时刻—命运之线会在某个瞬间掌握在一个窝囊废手中。英雄们的世界游戏象一阵风暴似的也把那些平庸之辈卷了进来。但是当重任突然降临到它们身上时，它们与其说感到庆幸，毋宁说感到害怕。他们几乎都是哆哆嗦嗦地把跑过来的命运又重新从手中放开。</p>
</li>
</ul>
</blockquote>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/02/11/reading-educated/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/02/11/reading-educated/" class="post-title-link" itemprop="url">《你当像鸟飞向你的山》</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-02-11 23:17:28" itemprop="dateCreated datePublished" datetime="2020-02-11T23:17:28+08:00">2020-02-11</time>
            </span>
          

          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2020-02-12 23:50:28" itemprop="dateModified" datetime="2020-02-12T23:50:28+08:00">2020-02-12</time>
              </span>
            
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/阅读/" itemprop="url" rel="index"><span itemprop="name">阅读</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/02/11/reading-educated/" class="post-meta-item leancloud_visitors" data-flag-title="《你当像鸟飞向你的山》">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/02/11/reading-educated/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/02/11/reading-educated/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>英文书名是《Educated》，翻译成中文后的书名搞的好复杂，看得出译者在非常努力的想表达这本书的内涵。<br>塔拉•韦斯特弗出生在美国爱达荷州山区的一个农民家庭，这本书是她的自传，记录了自己从一个乡村小姑娘成长为剑桥博士的心路历程。<br><strong>作者</strong><br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/Book/Educated-Author.png" alt><br>书中出场的所有重要角色主要为她的家庭成员，塔拉兄妹共8人：6个哥哥，1个姐姐。对整个家庭影响最大的就是父亲和哥哥肖恩。父亲独断专横，哥哥家暴，习惯性的殴打妹妹们，给小塔拉造成了极大的不安，塔拉在外出求学初期，几乎无法信任别人，过了很长时间才知道接受别人的帮助是正确的，之后她的人生就开挂了。塔拉最终通过教育重塑了自己，远离了家庭。在与家庭割裂的过程中，塔拉的心灵多次受到重创，深患抑郁症。她最终成为剑桥博士，而这个时候她已经完全回不去山区的老家了。<br>塔拉在自我觉醒的那刻写了这么段话来表明自己家庭的原罪：我已察觉出我们是如何被别人给予我们的传统塑造，而这个传统我们有意无意的忽略了。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/Book/Educated_MAP_2.png" alt></p>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/01/30/nimble-adv-starttime/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/01/30/nimble-adv-starttime/" class="post-title-link" itemprop="url">Nimble Advertising Start time计算</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-01-30 22:04:57" itemprop="dateCreated datePublished" datetime="2020-01-30T22:04:57+08:00">2020-01-30</time>
            </span>
          

          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2020-02-05 22:21:57" itemprop="dateModified" datetime="2020-02-05T22:21:57+08:00">2020-02-05</time>
              </span>
            
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Nimble/" itemprop="url" rel="index"><span itemprop="name">Nimble</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/01/30/nimble-adv-starttime/" class="post-meta-item leancloud_visitors" data-flag-title="Nimble Advertising Start time计算">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/01/30/nimble-adv-starttime/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/01/30/nimble-adv-starttime/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>参考文献:</p>
<ol>
<li><a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fgroup__nrf__rtc__hal.html&amp;resultof=%22%3d%4e%52%46%5f%52%54%43%5f%54%79%70%65%22%20">Nordic API docs</a></li>
<li><a href="https://jaydenh215.github.io/2019/11/07/rtt-nimble揭秘系列——phy（6）/">rtt+nimble揭秘系列——phy</a></li>
<li><a href="https://datasheet.octopart.com/NRF52-DK-Nordic-Semiconductor-datasheet-62297784.pdf">nRF52832 Datasheet</a></li>
</ol>
<p>在start advertising的时候，从Host角度看非常的简单，只是通过如下API送几个参数给Controller，然后等着event回来做相应的处理就好了，而Controller则要考虑很多细节来找到比较合适的真正的开始发送Adv data的时间，本文介绍下Nimble计算这个时间的一个流程。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">int</span><br><span class="line">ble_gap_adv_start(uint8_t own_addr_type, const ble_addr_t *direct_addr,</span><br><span class="line">                  int32_t duration_ms,</span><br><span class="line">                  const struct ble_gap_adv_params *adv_params,</span><br><span class="line">                  ble_gap_event_fn *cb, void *cb_arg)</span><br></pre></td></tr></table></figure></p>
<p>以下图为参考，总结下Nimbble controller处理adv start time的几个步骤：<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/Nimble/Nimble-Adv-StartTime_4.png" alt="StartAdvTime"></p>
<p>图中横轴为时间，每个小格子为一个tick，30.5us。为了便于理解，假定Controller在收到Host的请求，执行到函数<em>ble_ll_adv_sm_start()</em> 开始计算Adv的start time时，tick刚好为100，后续的各个关键步骤以及相关的时间点如下：</p>
<ol>
<li>依照Spec，一般会在Adv开始点加一个随机的AdvDelay(小于10ms）以避免adv event与Scan window 完美错开，导致对方怎么扫都扫不到。图中假定这个AdvDelay是15个tick，也就是adv_pdu_start_time 是<strong>115</strong>。</li>
<li><p>启动Radio开始发送数据，需要考虑Radio的settling time，以及为Radio准备要发送的数据耗费的时间，所以要想在<strong>115</strong>时把数据真正的发送出去，就要提前开始行动，这个提前开始行动的时间在nimble中定义如下：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">/*</span><br><span class="line"> * This is the offset from the start of the scheduled item until the actual</span><br><span class="line"> * tx/rx should occur, in ticks. We also &quot;round up&quot; to the nearest tick.</span><br><span class="line"> */</span><br><span class="line">g_ble_ll_sched_offset_ticks =</span><br><span class="line">    (uint8_t) os_cputime_usecs_to_ticks(XCVR_TX_SCHED_DELAY_USECS + 30);</span><br></pre></td></tr></table></figure>
</li>
<li><p><strong>g_ble_ll_sched_offset_ticks</strong>，在不同的chip上是不同的，</p>
<ul>
<li>nRF51是 <strong>370us</strong> ，其中140us为Radio的settling time，230us为给Radio准备数据的时间。</li>
<li>nRF52系列是 <strong>193us</strong> ，其中40us为Radio的settling time，153为给Radio准备数据的时间。<br>所以对于<strong>nRF51</strong>来说，这个offset ticks为 <strong>(370+30)/30.5 = 13 tick</strong> 。<strong>115</strong>提前13个tick，start_time就是<strong>102</strong>。</li>
</ul>
</li>
<li><p>接着将这个预期的的start_time通过函数 </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ble_ll_sched_adv_new()</span><br></pre></td></tr></table></figure>
<p>送给scheduler去确定是否能在这个时间点正式开始。假如很幸运，这个adv的sched没有跟已有的sched overlap，那就直接到到第#6步。</p>
</li>
<li>如果第#4步中有发现该sched跟其他的sched有overlap，那这个start time就只能由Scheduler来找个合适的位置了，假定找到的位置是<strong>122</strong>。</li>
<li>在<strong>122</strong>正式开始发送数据，由#2知，真正能开始发送数据的时间时<strong>g_ble_ll_sched_offset_ticks</strong>后，即<strong>13</strong>个tick后，也就是<strong>135</strong>才是Radio真正开始发送PDU的时候。</li>
<li>而要在<strong>135</strong>发送数据，就要提前<strong>140us(nRF51)</strong> 就把Radio开启，以保证在<strong>135</strong>时Radio能正常工作。这个工作主要是在如下这个函数执行。<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ble_phy_set_start_time(uint32_t cputime, uint8_t rem_usecs)</span><br></pre></td></tr></table></figure>
</li>
</ol>
<ul>
<li><p>函数使用RTC0和TIMER0两个定时器来定时完成，TIMER0时由1M clock驱动，精准度为1us。如下这段函数将精准表示Radio开启时间点（绿色旗帜），先用RTC0来定位到蓝色旗帜时间点最近的tick（cputime），之后用TIMER0来定位从这个tick开始再过多少个us到达蓝色旗帜的位置，要启动Radio。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">if (rem_usecs &lt;= 18) &#123;</span><br><span class="line">    cputime -= 5;</span><br><span class="line">    rem_usecs += 12;</span><br><span class="line">&#125; else &#123;</span><br><span class="line">    cputime -= 4;</span><br><span class="line">    rem_usecs -= 18;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>后面这段是设定好RTC0 和TIMER0后再启动RTC0 和 TIMER0。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line">next_cc = cputime &amp; 0xffffff;</span><br><span class="line">cur_cc = NRF_RTC0-&gt;CC[0];</span><br><span class="line">cntr = NRF_RTC0-&gt;COUNTER;</span><br><span class="line"></span><br><span class="line">delta = (cur_cc - cntr) &amp; 0xffffff;</span><br><span class="line">if ((delta &lt;= 3) &amp;&amp; (delta != 0)) &#123;</span><br><span class="line">    return -1;</span><br><span class="line">&#125;</span><br><span class="line">delta = (next_cc - cntr) &amp; 0xffffff;</span><br><span class="line">if ((delta &amp; 0x800000) || (delta &lt; 3)) &#123;</span><br><span class="line">    return -1;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">/* Clear and set TIMER0 to fire off at proper time */</span><br><span class="line">NRF_TIMER0-&gt;TASKS_CLEAR = 1;</span><br><span class="line">NRF_TIMER0-&gt;CC[0] = rem_usecs;</span><br><span class="line">NRF_TIMER0-&gt;EVENTS_COMPARE[0] = 0;</span><br><span class="line"></span><br><span class="line">/* Set RTC compare to start TIMER0 */</span><br><span class="line">NRF_RTC0-&gt;EVENTS_COMPARE[0] = 0;</span><br><span class="line">NRF_RTC0-&gt;CC[0] = next_cc;</span><br><span class="line">NRF_RTC0-&gt;EVTENSET = RTC_EVTENSET_COMPARE0_Msk;</span><br><span class="line"></span><br><span class="line">/* Enable PPI */</span><br><span class="line">NRF_PPI-&gt;CHENSET = PPI_CHEN_CH31_Msk;</span><br></pre></td></tr></table></figure>
</li>
<li><p>对于Nordic的系列chip，PPI（Programmable peripheral interconnect）得一定了解下，具体可参考Nordic的<a href="https://datasheet.octopart.com/NRF52-DK-Nordic-Semiconductor-datasheet-62297784.pdf">Datasheet</a>。PPI是一种不通过CPU就可以让Periphral之间相互通信的一套机制，由一个16M的clock来驱动，如下图，可以通过config，将PPI的Channel m的EEP（Event End Point）和另外一个Channel n的TEP（Task End Point）建立联系，这样Channel m就与Channel n建立联系了。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/Nordic/nRF52-PPI-logic.png" alt><br>对于上面一段code segment，RTC0，TIMER0及RADIO之间的关系是通过下面这段内置的config来建立的。 NRF_PPI-&gt;CHENSET = PPI_CHEN_CH31_Msk 将Channel 31 enable，所以RTC0在COMPARE_EVENT[0]被trigger的时候就启动TIMER0，而TIMER0的COMPARE_EVENT[0]被trigger的时候，RADIO的TX就Enable了。<br><img src="https://wnnwoo.oss-cn-chengdu.aliyuncs.com/Nordic/nRF52-PPI-preconfig.png" alt></p>
</li>
</ul>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
        

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/01/28/nimble-ll-state/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Wen Wu">
      <meta itemprop="description" content="I'm a bluetooth Host and Controller developer">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Wen Wu's notes">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                
                <a href="/2020/01/28/nimble-ll-state/" class="post-title-link" itemprop="url">nimble Link layer 状态机</a>
              
            
          </h1>
        

        <div class="post-meta">

          
          
          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2020-01-28 00:27:55" itemprop="dateCreated datePublished" datetime="2020-01-28T00:27:55+08:00">2020-01-28</time>
            </span>
          

          

          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Bluetooth/" itemprop="url" rel="index"><span itemprop="name">Bluetooth</span></a></span>

                
                
              
            </span>
          

          
          
            <span id="/2020/01/28/nimble-ll-state/" class="post-meta-item leancloud_visitors" data-flag-title="nimble Link layer 状态机">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              
                <span class="post-meta-item-text">阅读次数：</span>
              
                <span class="leancloud-visitors-count"></span>
            </span>
          

          

          
            
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="fa fa-comment-o"></i>
    </span>
    
      <span class="post-meta-item-text">评论数：</span>
    
  
    <a href="/2020/01/28/nimble-ll-state/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/01/28/nimble-ll-state/" itemprop="commentCount"></span>
    </a>
  </span>
  
  
          

          <br>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>Link Layer总共有7个状态，这7个状态串起了整个Link layer的运作。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">#define BLE_LL_STATE_STANDBY        (0)</span><br><span class="line">#define BLE_LL_STATE_ADV            (1)</span><br><span class="line">#define BLE_LL_STATE_SCANNING       (2)</span><br><span class="line">#define BLE_LL_STATE_INITIATING     (3)</span><br><span class="line">#define BLE_LL_STATE_CONNECTION     (4)</span><br><span class="line">#define BLE_LL_STATE_DTM            (5)</span><br><span class="line">#define BLE_LL_STATE_SYNC           (6)</span><br></pre></td></tr></table></figure>
<pre class="mermaid">stateDiagram
    [*] --> STANDBY : reset
    STANDBY --> ADV
    STANDBY --> SCANNING
    STANDBY --> SYNC
    ADV --> STANDBY
    ADV --> SYNC
    ADV --> CONNECTION
    SCANNING --> STANDBY
    SCANNING --> INITIATING
    SCANNING --> SYNC
    INITIATING --> CONNECTION
    INITIATING --> STANDBY
    CONNECTION --> STANDBY
    CONNECTION --> DTM
    CONNECTION --> SYNC
    DTM --> STANDBY
    SYNC --> STANDBY</pre>

          
        
      
    </div>

    

    

    
    
    

    

    
      
    
    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>

    
  </section>

  
  <nav class="pagination">
    <a class="extend prev" rel="prev" href="/page/2/"><i class="fa fa-angle-left" aria-label="上一页"></i></a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/">2</a><span class="page-number current">3</span><a class="page-number" href="/page/4/">4</a><span class="space">&hellip;</span><a class="page-number" href="/page/8/">8</a><a class="extend next" rel="next" href="/page/4/"><i class="fa fa-angle-right" aria-label="下一页"></i></a>
  </nav>



          </div>
          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      

      <div class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">

          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  
  <p class="site-author-name" itemprop="name">Wen Wu</p>
  <div class="site-description motion-element" itemprop="description">I'm a bluetooth Host and Controller developer</div>
</div>


  <nav class="site-state motion-element">
    
      <div class="site-state-item site-state-posts">
        
          <a href="/archives/">
        
          <span class="site-state-item-count">80</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
    

    
      
      
      <div class="site-state-item site-state-categories">
        
          
            <a href="/categories/">
          
        
        
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
        <span class="site-state-item-count">16</span>
        <span class="site-state-item-name">分类</span>
        </a>
      </div>
    

    
      
      
      <div class="site-state-item site-state-tags">
        
          
            <a href="/tags/">
          
        
        
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
        <span class="site-state-item-count">39</span>
        <span class="site-state-item-name">标签</span>
        </a>
      </div>
    
  </nav>













          
          
        </div>
      </div>

      

      

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2022</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Wen Wu</span>

  

  
</div>


  <div class="powered-by">由 <a href="https://hexo.io" class="theme-link" rel="noopener" target="_blank">Hexo</a> 强力驱动 v3.9.0</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 – <a href="https://theme-next.org" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> v7.2.0</div>





  <script src="https://unpkg.com/mermaid@/dist/mermaid.min.js"></script>
  <script>
    if (window.mermaid) {
      mermaid.initialize("");
    }
  </script>



        








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

    

    

  </div>

  

<script>
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>
















  
  









  
  <script src="/lib/jquery/index.js?v=3.4.1"></script>

  
  <script src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>




  <script src="/js/utils.js?v=7.2.0"></script>

  <script src="/js/motion.js?v=7.2.0"></script>



  
  


  <script src="/js/affix.js?v=7.2.0"></script>

  <script src="/js/schemes/pisces.js?v=7.2.0"></script>




  

  <script src="/js/next-boot.js?v=7.2.0"></script>

  

  

  


  
  

  
  
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
  

  























<script>
if ($('body').find('pre.mermaid').length) {
  $.ajax({
    type: 'GET',
    url: '//cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js',
    dataType: 'script',
    cache: true,
    success: function() {
      mermaid.initialize({
        theme: 'forest',
        logLevel: 3,
        flowchart: { curve: 'linear' },
        gantt: { axisFormat: '%m/%d/%Y' },
        sequence: { actorMargin: 50 }
      });
    }
  });
}
</script>


<script>
// GET RESPONSIVE HEIGHT PASSED FROM IFRAME

window.addEventListener("message", function(e) {
  var data = e.data;
  if ((typeof data === 'string') && (data.indexOf('ciu_embed') > -1)) {
    var featureID = data.split(':')[1];
    var height = data.split(':')[2];
    $(`iframe[data-feature=${featureID}]`).height(parseInt(height) + 30);
  }
}, false);
</script>








  
    

  

<script src="//cdn.jsdelivr.net/npm/valine@1/dist/Valine.min.js"></script>

<script>
  var GUEST = ['nick', 'mail', 'link'];
  var guest = 'nick,mail,link';
  guest = guest.split(',').filter(function(item) {
    return GUEST.indexOf(item) > -1;
  });
  new Valine({
    el: '#comments',
    verify: false,
    notify: false,
    appId: 'wteo2C9GdG6F2N92cktVar8K-gzGzoHsz',
    appKey: 'IBKrtkUwlKqPJ8FQsKkNP0K1',
    placeholder: 'Just go go',
    avatar: 'mm',
    meta: guest,
    pageSize: '10' || 10,
    visitor: true,
    lang: 'zh-cn' || 'zh-cn'
  });
</script><!-- hexo-inject:begin --><!-- Begin: Injected MathJax -->
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({"tex2jax":{"inlineMath":[["$","$"],["\\(","\\)"]],"skipTags":["script","noscript","style","textarea","pre","code"],"processEscapes":true},"TeX":{"equationNumbers":{"autoNumber":"AMS"}}});
</script>

<script type="text/x-mathjax-config">
  MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
      all[i].SourceElement().parentNode.className += ' has-jax';
    }
  });
</script>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js">
</script>
<!-- End: Injected MathJax -->
<!-- hexo-inject:end -->

  

</body>
</html>
